package com.crm.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.crm.service.impl.PermissionServiceImpl;

@RestController
@RequestMapping("/permission")
public class PeimissionController {

	@Autowired
	private PermissionServiceImpl service;
	@GetMapping
	public Object getAllPeimission(Integer id) {
		System.out.println("id:"+id);
		return service.getPermissionByRoleId(id);
	}
	@PutMapping
	public Object manageRole_Permission(Integer rid,String pids) {
		return service.manageRole_Permission(rid, pids);
	}
}
